﻿@using Nop.Core.Infrastructure;
@using Telerik.Web.Mvc.UI;
@using Nop.Core.Domain.Catalog;
@using Nop.Services.Catalog;
@using System.Linq;

@{    
    var _manufacturerService = EngineContext.Current.Resolve<IManufacturerService>();
    var allManufacturers = _manufacturerService.GetAllManufacturers().Where(m => !m.Deleted);


    var manufacturerList = new List<SelectListItem>();
    foreach (var m in allManufacturers)
    {
        var item = new SelectListItem()
        {
            Text = m.Name,
            Value = m.Id.ToString()
        };
        manufacturerList.Add(item);
    }
    
}

@Html.Telerik().DropDownList().Name("Manufacturer").BindTo(manufacturerList)